﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GalaSoft.MvvmLight;

namespace HWAlarmGroupCreator
{
	public class HWDataConnection : ObservableObject
	{
        public string PointName { get; private set; }
        
        public  HWDataConnection(string pointName)
        {
            PointName = pointName;
        }

        /// <summary>
        /// The <see cref="ExportAllowed" /> property's name.
        /// </summary>
        public const string ExportAllowedPropertyName = "ExportAllowed";
            
	    private bool _exportAllowed = true;

        /// <summary>
        /// Sets and gets the ExportAllowed property.
        /// Changes to that property's value raise the PropertyChanged event. 
        /// </summary>
        public bool ExportAllowed
        {
            get
            {
                return _exportAllowed;
            }

            set
            {
                if (_exportAllowed == value)
                {
                    return;
                }

                RaisePropertyChanging(ExportAllowedPropertyName);
                _exportAllowed = value;
                RaisePropertyChanged(ExportAllowedPropertyName);
            }
        }
	}
}
